package luminus.origin.utils

import org.bukkit.command.CommandSender
import taboolib.common.platform.ProxyCommandSender
import taboolib.common.platform.function.adaptCommandSender
import taboolib.common.platform.function.pluginVersion
import taboolib.module.chat.component

fun CommandSender.sendWithPrefix(msg: String) {
    send("[Luminus](gradient=#0000cd,#fda085) [>>>](gradient=#fda085,#f6d365) $msg")
}

fun CommandSender.send(msg: String) {
    msg.component().buildColored().sendTo(
        adaptCommandSender(this)
    )
}

fun ProxyCommandSender.sendWithPrefix(msg: String) {
    send("[Luminus](gradient=#0000cd,#fda085) [>>>](gradient=#fda085,#f6d365) $msg")
}

fun ProxyCommandSender.send(msg: String) {
    msg.component().buildColored().sendTo(
        this
    )
}